Pick up some stray feet/meter conversion. Regenerate dusky since it's provably correct.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 Apr 2006 20:46:12 +0000 (20:46 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 Apr 2006 20:46:12 +0000 (20:46 +0000)
gpsbabel/bcr.c
gpsbabel/csv_util.c
gpsbabel/reference/dusky.gnuplot
gpsbabel/tpg.c
gpsbabel/tpo.c

index c64104a7548e7c08e51547cef31935daa21fb209..b1a9c8dd58b367f68d468929a30c6c25f8267240 100644 (file)
@@ -179,7 +179,7 @@ bcr_data_read(void)
                        
                        xalt = atof(cx);
                        if (xalt != 999999999) {
-                               wpt->altitude = xalt / 3.2808;  /* convert feet to meters */
+                               wpt->altitude = FEET_TO_METERS(xalt);
                        }
                        
                        if (case_ignore_strcmp(str, "Standort") == 0)
index 8e05448491d247b8c53d31a98e76f53d967a2065..9a5a78d7554f52f7c872e258eef213e37f815666 100644 (file)
@@ -1274,7 +1274,7 @@ xcsv_waypt_pr(const waypoint *wpt)
         if (strcmp(fmp->key, "ALT_FEET") == 0) {
             /* altitude in feet as a decimal value */
             writebuff(buff, fmp->printfc,
-              (wpt->altitude * 3.2808));
+              METERS_TO_FEET(wpt->altitude));
         } else
         if (strcmp(fmp->key, "ALT_METERS") == 0) {
             /* altitude in meters as a decimal value */
index 87fe2c4ba29835338fe602b73ef95a42a8061b3d..952cfebe1bf08a4d97ffc72abdc27db04a03de44 100644 (file)
@@ -1,65 +1,65 @@
 plot "-" with lines
-0.0000 623.352000
-2.9718 711.933600
-3.2850 715.214400
-3.6167 715.214400
-5.5243 705.372000
-9.4129 659.440800
-23.4703        606.948000
-25.0162        610.228800
-30.9820        623.352000
-32.4677        616.790400
-34.3415        629.913600
-39.1519        639.756000
-40.1487        643.036800
-43.8551        639.756000
-45.1980        639.756000
-50.2415        643.036800
-50.7511        613.509600
-52.4188        652.879200
-59.6859        662.721600
-61.2516        698.810400
-71.6546        738.180000
-72.5283        764.426400
-87.9457        721.776000
-88.7923        725.056800
-91.6167        764.426400
-99.6578        902.220000
-99.8003        905.500800
-99.9720        905.500800
-100.1892       902.220000
-100.5724       882.535200
-102.0104       882.535200
-102.8041       875.973600
-103.0804       872.692800
-107.3975       921.904800
-107.9219       915.343200
-111.8075       977.678400
-112.3607       974.397600
-113.7989       1003.924800
-115.6245       967.836000
-119.3377       1082.664000
-120.3016       1040.013600
-122.6318       1030.171200
-125.0204       1056.417600
-125.1988       1089.225600
-127.7871       1076.102400
-129.8891       997.363200
-130.3262       974.397600
-130.9400       971.116800
-131.4143       1020.328800
-142.6996       935.028000
-147.6842       905.500800
-154.3627       902.220000
-155.0489       889.096800
-155.6592       872.692800
-156.1879       846.446400
-156.8340       869.412000
-157.3818       875.973600
-159.8910       846.446400
-159.9999       856.288800
-163.1963       866.131200
-164.7320       869.412000
-164.9323       859.569600
-165.1204       849.727200
+0.0000 623.359581
+2.9718 711.942258
+3.2850 715.223098
+3.6167 715.223098
+5.5243 705.380579
+9.4129 659.448820
+23.4703        606.955382
+25.0162        610.236221
+30.9820        623.359581
+32.4677        616.797901
+34.3415        629.921261
+39.1519        639.763781
+40.1487        643.044620
+43.8551        639.763781
+45.1980        639.763781
+50.2415        643.044620
+50.7511        613.517061
+52.4188        652.887140
+59.6859        662.729660
+61.2516        698.818899
+71.6546        738.188978
+72.5283        764.435697
+87.9457        721.784778
+88.7923        725.065618
+91.6167        764.435697
+99.6578        902.230973
+99.8003        905.511812
+99.9720        905.511812
+100.1892       902.230973
+100.5724       882.545933
+102.0104       882.545933
+102.8041       875.984253
+103.0804       872.703413
+107.3975       921.916012
+107.9219       915.354332
+111.8075       977.690290
+112.3607       974.409450
+113.7989       1003.937009
+115.6245       967.847771
+119.3377       1082.677167
+120.3016       1040.026248
+122.6318       1030.183729
+125.0204       1056.430448
+125.1988       1089.238847
+127.7871       1076.115487
+129.8891       997.375330
+130.3262       974.409450
+130.9400       971.128610
+131.4143       1020.341209
+142.6996       935.039372
+147.6842       905.511812
+154.3627       902.230973
+155.0489       889.107613
+155.6592       872.703413
+156.1879       846.456694
+156.8340       869.422573
+157.3818       875.984253
+159.8910       846.456694
+159.9999       856.299214
+163.1963       866.141734
+164.7320       869.422573
+164.9323       859.580054
+165.1204       849.737534
 e
index 992866e8f32707276435f5a4237879656898a224..e2d4b10c1cd0ced55dad304590d0d4e03736b8af 100644 (file)
@@ -281,7 +281,7 @@ tpg_waypt_pr(const waypoint *wpt)
         lon *= -1.0;
 
         /* convert meters back to feets */
-        elev = (short int) (wpt->altitude * 3.2808);
+        elev = (short int) METERS_TO_FEET(wpt->altitude);
 
         /* 1 bytes stringsize for shortname */
         c = strlen(shortname);
index b68b321abdbf3edbff3dc1b14a2003ac684cdd72..838f09adce80c0ccdf1bc156e933aec50298cd87 100644 (file)
@@ -759,10 +759,10 @@ tpo_track_disp(const waypoint *waypointp)
                &z);
 
        /* increase the track length by the 3D length of last track segment in feet */
-       track_length += 3.2808 * sqrt(
+       track_length += METERS_TO_FEET(sqrt(
                (x - last_waypoint_x) * (x - last_waypoint_x) + 
                (y - last_waypoint_y) * (y - last_waypoint_y) +
-               (z - last_waypoint_z) * (z - last_waypoint_z));
+               (z - last_waypoint_z) * (z - last_waypoint_z)));
        last_waypoint_x = x;
        last_waypoint_y = y;
        last_waypoint_z = z;